import React from 'react'
// ===================================================================== Temp
import FormModal from '#cpt/temp/FormModal'
// ===================================================================== global declare
const { $fn } = window
// ===================================================================== component
class Index extends React.Component{
	state = {
		data: [],
		// 条码作废
		formData:[
			{ label: '字典名称',	name:'item_name', 	full:true,	required:true },
			{ label: '描述', 	name:'remark', 		full:true, 	type:'textarea'},
		],
	}
	submit = {}
	open = ()=> {
		this.submit = {dis_code: 2000}
		this.modal.open({formRef: this.formRef})
	}
	
	render(){
		return FormModal.call(this, {title:'字典新增', labelWidth:'s5', width:700, api:'dis-item/codeAuto', 
			onRefresh:()=> this.props.onRefresh(),
			onComplete:({ param })=>{$fn.dataRemove('dictionary/items-2000')},
		} )
	}
}

export default Index